Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
PTPPortData Class Reference

This file holds CPTPPortData class declaration. More...

Public Member Functions

void setPtpVersion (int)
 Sets ptp version. More...
 
int getPtpVersion ()
 Gets ptp version. More...
 
void setPortState (PortState)
 Sets the profile type. More...
 
PortState getPortState ()
 Gets the port state. More...
 
string getPortStateStr ()
 Returns the profile as a string. More...
 
void setRecommendedPortState (PortState)
 Sets the recommended port state. More...
 
PortState getRecommendedPortState ()
 Gets the recommended port state. More...
 
void setDelayRequestInterval (int)
 Sets the delay request interval. More...
 
int getDelayRequestInterval ()
 Gets the delay request interval. More...
 
void setAnnounceReceiptTimeout (int)
 Sets the announcement receipt timout time. More...
 
int getAnnounceReceiptTimeout ()
 Gets the announcement receipt timout time. More...
 
void setAnnounceInterval (int)
 Sets the announcement interval time. More...
 
int getAnnounceInterval ()
 Gets the announcement interval time. More...
 
void setSyncInterval (int)
 Sets the sync interval time. More...
 
int getSyncInterval ()
 Gets the sync interval time. More...
 
void setSyncWaitLimit (long)
 Sets the sync interval wait limit. More...
 
int getSyncWaitLimit ()
 Gets the sync interval wait limit. More...
 
void setSyncMsgCounter (int)
 Sets the sync message counter. More...
 
void incrementSyncMsgCounter ()
 Increments the sync message counter. More...
 
int getSyncMsgCounter ()
 Gets the sync message counter. More...
 
void setDelayReqCounter (int)
 Sets the delay request counter. More...
 
void incrementDelayReqCounter ()
 Increments the delay request counter. More...
 
int getDelayReqCounter ()
 Gets delay request count. More...
 
void setAnnounceSeqNum (double)
 Sets the announce sequence number counter. More...
 
double getAnnounceSeqNum ()
 Gets the announce sequence number. More...
 
void setSyncSeqNum (double)
 Sets the sync sequence number. More...
 
double getSyncSeqNum ()
 Gets the sync sequence number. More...
 
void setDecisionCode (DecisionCode)
 Sets the decision code. More...
 
DecisionCode getDecisionCode ()
 Gets the recommended port state. More...
 
void setLastSyncSeqNum (double)
 Sets the last sync sequence number. More...
 
double getLastSyncSeqNum ()
 Gets the last sync sequence number. More...
 
void setLastGeneralEventSeqNum (double)
 Sets the last known general event sequence number. More...
 
double getLastGeneralEventSeqNum ()
 Gets the last general event sequence number. More...
 
void setBustEnabled (bool)
 Sets bust to be enabled or disabled. More...
 
bool isBustEnabled ()
 Gets bust enabled state. More...
 
bool removeForeignMasterBySrcPortId (string, int)
 Removes a foreign master by port. More...
 
void clearForeignMasterList ()
 Removes all the foreign masters. More...
 
void setEBestSrc (bool)
 Sets the port data to be or not to be the best source for grandmaster clock. More...
 
bool isEBestSrc ()
 Check if this port data is the best source for grandmaster clock. More...
 
void resetDatasetToDefault ()
 Resets the data set to default. More...
 
void cancelTimer ()
 Cancels the timer. More...
 
void clearConfig ()
 Clears the config. More...
 

Detailed Description

This file holds CPTPPortData class declaration.

Member Function Documentation

◆ cancelTimer()

void PTPPortData::cancelTimer ( )

Cancels the timer.

◆ clearConfig()

void PTPPortData::clearConfig ( )

Clears the config.

◆ clearForeignMasterList()

void PTPPortData::clearForeignMasterList ( )

Removes all the foreign masters.

◆ getAnnounceInterval()

int PTPPortData::getAnnounceInterval ( )

Gets the announcement interval time.

Returns
int, the announcement interval time.

◆ getAnnounceReceiptTimeout()

int PTPPortData::getAnnounceReceiptTimeout ( )

Gets the announcement receipt timout time.

Returns
int, the announcement receipt timout time.

◆ getAnnounceSeqNum()

double PTPPortData::getAnnounceSeqNum ( )

Gets the announce sequence number.

Returns
double, value is the announce sequence number.

◆ getDecisionCode()

DecisionCode PTPPortData::getDecisionCode ( )

Gets the recommended port state.

Returns
enum<DecisionCode>, the profile type. Decision codes: None = 0, M1 = 1, M2 = 2, M3 = 3, P1 = 4, P2 = 5, S1 = 6

◆ getDelayReqCounter()

int PTPPortData::getDelayReqCounter ( )

Gets delay request count.

Returns
int, the delay request count.

◆ getDelayRequestInterval()

int PTPPortData::getDelayRequestInterval ( )

Gets the delay request interval.

Returns
int, the delay request interval time in seconds.

◆ getLastGeneralEventSeqNum()

double PTPPortData::getLastGeneralEventSeqNum ( )

Gets the last general event sequence number.

Returns
double, value is the last sync sequence number.

◆ getLastSyncSeqNum()

double PTPPortData::getLastSyncSeqNum ( )

Gets the last sync sequence number.

Returns
double, value is the last sync sequence number.

◆ getPortState()

PortState PTPPortData::getPortState ( )

Gets the port state.

Returns
enum<PortState>, the profile type. Port states: eFaulty = 0, eInit = 1, eDisabled = 2, eListening = 3, eUncalibrated = 4, ePreMaster = 5, eSlave = 6, eMaster = 7, ePassive = 8

◆ getPortStateStr()

string PTPPortData::getPortStateStr ( )

Returns the profile as a string.

Returns
string, profile strings: "FAULTY", "INITIALIZING", "DISABLED", "LISTENING", "UNCALIBRATED", "PRE_MASTER", "SLAVE", "MASTER", "PASSIVE"

◆ getPtpVersion()

int PTPPortData::getPtpVersion ( )

Gets ptp version.

Returns
int, version number.

◆ getRecommendedPortState()

PortState PTPPortData::getRecommendedPortState ( )

Gets the recommended port state.

Returns
enum<PortState>, the profile type. Port states: eFaulty = 0, eInit = 1, eDisabled = 2, eListening = 3, eUncalibrated = 4, ePreMaster = 5, eSlave = 6, eMaster = 7, ePassive = 8

◆ getSyncInterval()

int PTPPortData::getSyncInterval ( )

Gets the sync interval time.

Returns
int, the sync interval time.

◆ getSyncMsgCounter()

int PTPPortData::getSyncMsgCounter ( )

Gets the sync message counter.

Returns
int, value is the sync message count.

◆ getSyncSeqNum()

double PTPPortData::getSyncSeqNum ( )

Gets the sync sequence number.

Returns
double, value is the sync message count.

◆ getSyncWaitLimit()

int PTPPortData::getSyncWaitLimit ( )

Gets the sync interval wait limit.

Returns
int, the sync interval wait limit.

◆ incrementDelayReqCounter()

void PTPPortData::incrementDelayReqCounter ( )

Increments the delay request counter.

◆ incrementSyncMsgCounter()

void PTPPortData::incrementSyncMsgCounter ( )

Increments the sync message counter.

◆ isBustEnabled()

bool PTPPortData::isBustEnabled ( )

Gets bust enabled state.

Returns
bool, returns true if bust is enabled, false if not.

◆ isEBestSrc()

bool PTPPortData::isEBestSrc ( )

Check if this port data is the best source for grandmaster clock.

Returns
value, true if it is and false otherwise.

◆ removeForeignMasterBySrcPortId()

bool PTPPortData::removeForeignMasterBySrcPortId ( string  ,
int   
)

Removes a foreign master by port.

Parameters
uuid,uuidto find for.
portNum,portto find for.
Returns
bool, value is true if the foreign master as removed, false if not.

◆ resetDatasetToDefault()

void PTPPortData::resetDatasetToDefault ( )

Resets the data set to default.

◆ setAnnounceInterval()

void PTPPortData::setAnnounceInterval ( int  )

Sets the announcement interval time.

Parameters
num,thetime.

◆ setAnnounceReceiptTimeout()

void PTPPortData::setAnnounceReceiptTimeout ( int  )

Sets the announcement receipt timout time.

Parameters
num,thetime.

◆ setAnnounceSeqNum()

void PTPPortData::setAnnounceSeqNum ( double  )

Sets the announce sequence number counter.

Parameters
num,valueto use.

◆ setBustEnabled()

void PTPPortData::setBustEnabled ( bool  )

Sets bust to be enabled or disabled.

Parameters
enable,trueto enable, false to disable.

◆ setDecisionCode()

void PTPPortData::setDecisionCode ( DecisionCode  )

Sets the decision code.

Parameters
code,thecode to use. codes: None = 0, M1 = 1, M2 = 2, M3 = 3, P1 = 4, P2 = 5, S1 = 6

◆ setDelayReqCounter()

void PTPPortData::setDelayReqCounter ( int  )

Sets the delay request counter.

Parameters
num,valueto use.

◆ setDelayRequestInterval()

void PTPPortData::setDelayRequestInterval ( int  )

Sets the delay request interval.

Parameters
num,thedelay time in seconds

◆ setEBestSrc()

void PTPPortData::setEBestSrc ( bool  )

Sets the port data to be or not to be the best source for grandmaster clock.

Parameters
value,trueif the port data is the best source for grandmaster clock and false otherwise.

◆ setLastGeneralEventSeqNum()

void PTPPortData::setLastGeneralEventSeqNum ( double  )

Sets the last known general event sequence number.

Parameters
num,valueto use.

◆ setLastSyncSeqNum()

void PTPPortData::setLastSyncSeqNum ( double  )

Sets the last sync sequence number.

Parameters
num,valueto use.

◆ setPortState()

void PTPPortData::setPortState ( PortState  )

Sets the profile type.

Parameters
state,theport state to use. states: eFaulty = 0, eInit = 1, eDisabled = 2, eListening = 3, eUncalibrated = 4, ePreMaster = 5, eSlave = 6, eMaster = 7, ePassive = 8

◆ setPtpVersion()

void PTPPortData::setPtpVersion ( int  )

Sets ptp version.

Parameters
num,versionnumber to use.

◆ setRecommendedPortState()

void PTPPortData::setRecommendedPortState ( PortState  )

Sets the recommended port state.

Parameters
state,theport state to use. states: eFaulty = 0, eInit = 1, eDisabled = 2, eListening = 3, eUncalibrated = 4, ePreMaster = 5, eSlave = 6, eMaster = 7, ePassive = 8

◆ setSyncInterval()

void PTPPortData::setSyncInterval ( int  )

Sets the sync interval time.

Parameters
num,thetime.

◆ setSyncMsgCounter()

void PTPPortData::setSyncMsgCounter ( int  )

Sets the sync message counter.

Parameters
value,valueto use.

◆ setSyncSeqNum()

void PTPPortData::setSyncSeqNum ( double  )

Sets the sync sequence number.

Parameters
num,valueto use.

◆ setSyncWaitLimit()

void PTPPortData::setSyncWaitLimit ( long  )

Sets the sync interval wait limit.

Parameters
num,thewait.

The documentation for this class was generated from the following file: